{{#each message}}
{{#if date}}
<div class="messages-date">{{date}}</div>
{{/if}}
{{#if image}}
<div class="message message-{{from}} message-pic ">
    <div class="message-text"><img src="{{text}}"/></div>
</div>
{{else}}
<div class="message message-{{from}} message-last">
    <div class="message-text">{{text}}</div>
</div>
{{/if}}
{{/each}}